package com.example.udpDemo.socket.udp;

import com.example.udpDemo.enums.DetectObjectEnum;
import com.example.udpDemo.enums.GasStatusEnum;
import com.example.udpDemo.enums.MeasurementUnitEnum;
import com.example.udpDemo.enums.NettyPacketTypeEnum;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

/**
 * Description: 自定义Netty数据包
 *
 * @author sjt Administrator
 * @since 2023/11/28 22:21
 */
@Data
@Slf4j
public class NettyPacket implements Serializable {


    private NettyPacketTypeEnum nettyPacketType;
    //数据类型 0-传感器  1-事件 2-控制器
    private Integer dataType;
    //编号
    private String sn;
    //类型
    private Object type; //DetectObjectEnum or EventEnum
    //检测对象
    private DetectObjectEnum detectObject;
    //值
    private String value;
    //单位
    private MeasurementUnitEnum unit;
    //小数点
    private Integer numPort;
    //状态
    private GasStatusEnum status;

}
